import { getMovieInfo } from "@/api/Detail";


const state ={
    Detail:{},
    actorList:[],
    director:{},
    tuiVideos:[],
    tuiImages:[],
    watchList:[],

};
const mutations ={
    DETAIL(state,data){
        state.Detail=data.detail
        state.actorList=data.actorList
        state.director=data.director
        state.tuiVideos=data.tuiVideos
        state.watchList=data.watchList
        state.Detail.typeName=data.typeName
        state.tuiImages=data.tuiImages
    },

};
const actions ={
    async detail({commit}){
        let result = await getMovieInfo()
        if(result.success==true){
                    console.log("vuex",result);
                    commit("DETAIL",result.data)
                    console.log("detail",result.data.detail);
        }
            
            
    }
};
const getters ={};

export default {
    state,
    mutations,
    actions,
    getters
}